<?php
	class SentLog extends AppModel
	{
		function logSend($scheduleId,$email)
		{
			$this->create();
			$data[$this->alias] = array('email'=>$email,'schedule_id'=>$scheduleId);	
			$this->save($data);
		}
		
		function cleanUp($scheduleId)
		{
			$this->deleteAll(array('schedule_id'=>$scheduleId));
		}
		
		function hasSent($schduleId,$email)
		{
			return $this->hasAny(array('schedule_id'=>$schduleId,'email'=>$email));
		}
	}
?>